package com.bw.counter.net

import com.bw.base.constants.ApiConst
import com.bw.counter.entity.ChargeData
import com.bw.counter.entity.CounterData
import com.bw.http.utils.Res
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface ApiService {
    @GET(ApiConst.URL_GET_Counter)
    suspend fun getCount(@Path("payerId")payerId:Int):Res<List<CounterData>>
    @GET(ApiConst.URL_GET_Count_Detail)
    suspend fun getDetail(@Path("id")id:Int):Res<List<CounterData>>
    @DELETE(ApiConst.PATH_DELETE)
    suspend fun delCount(@Path("id")id:Int):Res<Boolean>
    @POST(ApiConst.URL_POST_AddCount)
    suspend fun addCounter(@Body counterData: CounterData):Res<CounterData>
    @GET(ApiConst.URL_GET_AllCharge)
    suspend fun getCharge(@Path("payerId")payerId:Int):Res<List<ChargeData>>
}